package com.lims.landInfo.model;

import javax.persistence.*;

import org.hibernate.annotations.GenericGenerator;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import javacommon.base.*;

import cn.org.rapid_framework.util.*;
/**
 * @author zzh
 * @version 1.0
 * @since 1.0
 */
@Entity
@Table(name = "LIMS_HouseRent")
public class HouseRent extends BaseEntity implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
	//date formats
	public static final String FORMAT_LAND_DATE = DATE_FORMAT;
	public static final String FORMAT_CREATE_DATE = DATE_FORMAT;
	
	//columns START
    /**
     * objid       db_column: OBJID 
     */ 	
	private java.lang.String objid;
    /**
     * sno       db_column: sno 
     */ 	
	private java.lang.Integer sno;
    /**
     * landno       db_column: landno 
     */ 	
	private java.lang.String landno;
    /**
     * lesseeNum       db_column: lesseeNum 
     */ 	
	private java.lang.Integer lesseeNum;
    /**
     * contractNum       db_column: contractNum 
     */ 	
	private java.lang.Integer contractNum;
    /**
     * safetyNum       db_column: safetyNum 
     */ 	
	private java.lang.Integer safetyNum;
    /**
     * contractUse       db_column: contractUse 
     */ 	
	private java.lang.Integer contractUse;
    /**
     * houseArea       db_column: houseArea 
     */ 	
	private Double houseArea;
    /**
     * site       db_column: site 
     */ 	
	private java.lang.Integer site;
    /**
     * rentAmount       db_column: rentAmount 
     */ 	
	private Double rentAmount;
    /**
     * adjustment       db_column: adjustment 
     */ 	
	private java.lang.Integer adjustment;
    /**
     * noRentNum       db_column: noRentNum 
     */ 	
	private java.lang.Integer noRentNum;
    /**
     * fiveNum       db_column: fiveNum 
     */ 	
	private java.lang.Integer fiveNum;
    /**
     * longestTerm       db_column: longestTerm 
     */ 	
	private java.lang.Double longestTerm;
    /**
     * litigationNum       db_column: litigationNum 
     */ 	
	private java.lang.Integer litigationNum;
    /**
     * subletNum       db_column: subletNum 
     */ 	
	private java.lang.Integer subletNum;
    /**
     * agreedNum       db_column: agreedNum 
     */ 	
	private java.lang.Integer agreedNum;
	/**
     * changetype       db_column: CHANGETYPE 
     */ 	
	private Integer changeType;
	/**
     * oldno       db_column: oldno 
     */ 	
	private java.lang.String oldno;
    /**
     * oldContent       db_column: oldContent 
     */ 	
	private java.lang.String oldContent;
    /**
     * describe       db_column: describe 
     */ 	
	private java.lang.String describe;
    /**
     * landDate       db_column: landDate 
     */ 	
	private java.util.Date landDate;
    /**
     * createDate       db_column: createDate 
     */ 	
	private java.util.Date createDate;
	//columns END


	public HouseRent(){
	}

	public HouseRent(
		java.lang.String objid
	){
		this.objid = objid;
	}

	

	public void setObjid(java.lang.String value) {
		this.objid = value;
	}
	
	@Id @GeneratedValue(generator="custom-id")
	@GenericGenerator(name="custom-id", strategy = "uuid") //unique = true,  
	@Column(name = "OBJID", nullable = false, insertable = true, updatable = true, length = 32)
	public java.lang.String getObjid() {
		return this.objid;
	}
	
	@Column(name = "sno", unique = false, nullable = true, insertable = true, updatable = true, length = 10)
	public java.lang.Integer getSno() {
		return this.sno;
	}
	
	public void setSno(java.lang.Integer value) {
		this.sno = value;
	}
	
	@Column(name = "landno", unique = false, nullable = true, insertable = true, updatable = true, length = 32)
	public java.lang.String getLandno() {
		return this.landno;
	}
	
	public void setLandno(java.lang.String value) {
		this.landno = value;
	}
	
	@Column(name = "lesseeNum", unique = false, nullable = true, insertable = true, updatable = true, length = 10)
	public java.lang.Integer getLesseeNum() {
		return this.lesseeNum;
	}
	
	public void setLesseeNum(java.lang.Integer value) {
		this.lesseeNum = value;
	}
	
	@Column(name = "contractNum", unique = false, nullable = true, insertable = true, updatable = true, length = 10)
	public java.lang.Integer getContractNum() {
		return this.contractNum;
	}
	
	public void setContractNum(java.lang.Integer value) {
		this.contractNum = value;
	}
	
	@Column(name = "safetyNum", unique = false, nullable = true, insertable = true, updatable = true, length = 10)
	public java.lang.Integer getSafetyNum() {
		return this.safetyNum;
	}
	
	public void setSafetyNum(java.lang.Integer value) {
		this.safetyNum = value;
	}
	
	@Column(name = "contractUse", unique = false, nullable = true, insertable = true, updatable = true, length = 10)
	public java.lang.Integer getContractUse() {
		return this.contractUse;
	}
	
	public void setContractUse(java.lang.Integer value) {
		this.contractUse = value;
	}
	
	@Column(name = "houseArea", unique = false, nullable = true, insertable = true, updatable = true, length = 18)
	public Double getHouseArea() {
		return this.houseArea;
	}
	
	public void setHouseArea(Double value) {
		this.houseArea = value;
	}
	
	@Column(name = "site", unique = false, nullable = true, insertable = true, updatable = true, length = 10)
	public java.lang.Integer getSite() {
		return this.site;
	}
	
	public void setSite(java.lang.Integer value) {
		this.site = value;
	}
	
	@Column(name = "rentAmount", unique = false, nullable = true, insertable = true, updatable = true, length = 18)
	public Double getRentAmount() {
		return this.rentAmount;
	}
	
	public void setRentAmount(Double value) {
		this.rentAmount = value;
	}
	
	@Column(name = "adjustment", unique = false, nullable = true, insertable = true, updatable = true, length = 10)
	public java.lang.Integer getAdjustment() {
		return this.adjustment;
	}
	
	public void setAdjustment(java.lang.Integer value) {
		this.adjustment = value;
	}
	
	@Column(name = "noRentNum", unique = false, nullable = true, insertable = true, updatable = true, length = 10)
	public java.lang.Integer getNoRentNum() {
		return this.noRentNum;
	}
	
	public void setNoRentNum(java.lang.Integer value) {
		this.noRentNum = value;
	}
	
	@Column(name = "fiveNum", unique = false, nullable = true, insertable = true, updatable = true, length = 10)
	public java.lang.Integer getFiveNum() {
		return this.fiveNum;
	}
	
	public void setFiveNum(java.lang.Integer value) {
		this.fiveNum = value;
	}
	
	@Column(name = "longestTerm", unique = false, nullable = true, insertable = true, updatable = true, length = 53)
	public java.lang.Double getLongestTerm() {
		return this.longestTerm;
	}
	
	public void setLongestTerm(java.lang.Double value) {
		this.longestTerm = value;
	}
	
	@Column(name = "litigationNum", unique = false, nullable = true, insertable = true, updatable = true, length = 10)
	public java.lang.Integer getLitigationNum() {
		return this.litigationNum;
	}
	
	public void setLitigationNum(java.lang.Integer value) {
		this.litigationNum = value;
	}
	
	@Column(name = "subletNum", unique = false, nullable = true, insertable = true, updatable = true, length = 10)
	public java.lang.Integer getSubletNum() {
		return this.subletNum;
	}
	
	public void setSubletNum(java.lang.Integer value) {
		this.subletNum = value;
	}
	
	@Column(name = "agreedNum", unique = false, nullable = true, insertable = true, updatable = true, length = 10)
	public java.lang.Integer getAgreedNum() {
		return this.agreedNum;
	}
	
	public void setAgreedNum(java.lang.Integer value) {
		this.agreedNum = value;
	}
	
	@Column(name = "oldno", unique = false, nullable = true, insertable = true, updatable = true, length = 50)
	public java.lang.String getOldno() {
		return this.oldno;
	}
	
	public void setOldno(java.lang.String value) {
		this.oldno = value;
	}
	
	@Column(name = "oldContent", unique = false, nullable = true, insertable = true, updatable = true, length = 200)
	public java.lang.String getOldContent() {
		return this.oldContent;
	}
	
	public void setOldContent(java.lang.String value) {
		this.oldContent = value;
	}
	
	@Column(name = "describe", unique = false, nullable = true, insertable = true, updatable = true, length = 200)
	public java.lang.String getDescribe() {
		return this.describe;
	}
	
	public void setDescribe(java.lang.String value) {
		this.describe = value;
	}
	
	@Column(name = "changeType", unique = false, nullable = true, insertable = true, updatable = true, length = 22)
	public Integer getChangeType() {
		return this.changeType;
	}
	
	public void setChangeType(Integer value) {
		this.changeType = value;
	}
	
	@Transient
	public String getLandDateString() {
		return DateConvertUtils.format(getLandDate(), FORMAT_LAND_DATE);
	}
	public void setLandDateString(String value) {
		setLandDate(DateConvertUtils.parse(value, FORMAT_LAND_DATE,java.util.Date.class));
	}
	
	@Column(name = "landDate", unique = false, nullable = true, insertable = true, updatable = true, length = 23)
	public java.util.Date getLandDate() {
		return this.landDate;
	}
	
	public void setLandDate(java.util.Date value) {
		this.landDate = value;
	}
	
	@Transient
	public String getCreateDateString() {
		return DateConvertUtils.format(getCreateDate(), FORMAT_CREATE_DATE);
	}
	public void setCreateDateString(String value) {
		setCreateDate(DateConvertUtils.parse(value, FORMAT_CREATE_DATE,java.util.Date.class));
	}
	
	@Column(name = "createDate", unique = false, nullable = true, insertable = true, updatable = true, length = 23)
	public java.util.Date getCreateDate() {
		return this.createDate;
	}
	
	public void setCreateDate(java.util.Date value) {
		this.createDate = value;
	}
	

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("Objid",getObjid())
			.append("Sno",getSno())
			.append("Landno",getLandno())
			.append("LesseeNum",getLesseeNum())
			.append("ContractNum",getContractNum())
			.append("SafetyNum",getSafetyNum())
			.append("ContractUse",getContractUse())
			.append("HouseArea",getHouseArea())
			.append("Site",getSite())
			.append("RentAmount",getRentAmount())
			.append("Adjustment",getAdjustment())
			.append("NoRentNum",getNoRentNum())
			.append("FiveNum",getFiveNum())
			.append("LongestTerm",getLongestTerm())
			.append("LitigationNum",getLitigationNum())
			.append("SubletNum",getSubletNum())
			.append("AgreedNum",getAgreedNum())
			.append("Oldno",getOldno())
			.append("OldContent",getOldContent())
			.append("Describe",getDescribe())
			.append("LandDate",getLandDate())
			.append("CreateDate",getCreateDate())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getObjid())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof HouseRent == false) return false;
		if(this == obj) return true;
		HouseRent other = (HouseRent)obj;
		return new EqualsBuilder()
			.append(getObjid(),other.getObjid())
			.isEquals();
	}
}

